
public class Laptop {
	
	// state / fields / instance variables
		String make;
		String model;
		int year;
		int newMemory;
		int currentMemory;
		String color;
		String screenColor;
		boolean powerOn;
		boolean hasDefects;
		int size;
		
		
		
				
		//method 1 - Laptop is getting started
		void powerOn()
		{
			if (powerOn) {
				powerOn = false;
			}
			else {
			System.out.println(" Please wait Silver MacBook is getting started ");
			}
			
		}
		
		// method 2 - Displaying Info
		void displayInfo()
		{
			System.out.println(" This MacBook was built by " + make + " in " + year);
					
			if (powerOn) {
				System.out.println("Press F1 to continue!");
		}
		
		}
		void stop()
		{
			
			System.out.println(" Laptop is shutting down ");
			powerOn = false;
		}
		
		// method 3 - Screen color is changing
		void changeColor(String newColor)
		{
			color = newColor;
		}
		
		void screenColor(String newscrnColor)
		{
			color = newscrnColor;
		}
		
		
		// method 4 - Verifying if there are any defects
		public boolean hasDefects (String Defect, boolean cpuDefect, boolean memoryDefect)
		{
			if(cpuDefect)
			{
				return true;
			} else if(memoryDefect)
			{
				return true;
			} else if(Defect.equals("RAM") && Defect.equals("Battery"))
			{
				return true;
			} else {
				return false;
			}

				
		}
		// method 5 - Calculating Laptop's memory
		int Memory(int howMuch)
		{
			currentMemory = currentMemory + howMuch;
			return currentMemory;
		}
}


